home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / www_talk.930 / 000183_davis@willow.tc.cornell.edu _Thu Jul 16 14:50:20 1992.msg < prev    next >
Internet Message Format  |  1994-01-24  |  2KB

  1. Return-Path: <davis@willow.tc.cornell.edu>
  2. Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
  3.     id AA06423; Thu, 16 Jul 92 14:50:20 MET DST
  4. Received: by dxmint.cern.ch (dxcern) (5.57/3.14)
  5.     id AA26980; Thu, 16 Jul 92 14:50:04 +0200
  6. Received: by willow.tc.cornell.edu (4.1/SMI-4.1)
  7.     id AA23237; Thu, 16 Jul 92 08:51:35 EDT
  8. Date: Thu, 16 Jul 92 08:51:35 EDT
  9. From: davis@willow.tc.cornell.edu (Jim Davis)
  10. Message-Id: <9207161251.AA23237@willow.tc.cornell.edu>
  11. To: www-talk@nxoc01.cern.ch
  12. Subject: reading HTML mail
  13.  
  14. I don't know how many of you are using Mime for your mail (other
  15. than Dan) but I am starting to.  So today I modified my mailcap
  16. to be handle text/x-html messages, and since there was a little
  17. difficulty I thought I share it with you.
  18.  
  19. Here is what I added to my mailcap
  20.  
  21. text/x-html; mime-show-html -f %s; needsterminal
  22.  
  23. The command mime-show-html is a new script I wrote.  It starts
  24. up the Viola WWW browser (for which I thank the author!) but
  25. there are some small problems with Viola
  26.  
  27. 1) It seems that it requires that the file have suffix html
  28. in order to work
  29. 2) You can't tell it what file to read from the command line,
  30. rather you must set an environment variable.
  31.  
  32. So I wrote this little script:
  33.  
  34. #!/bin/csh
  35. # Run the Viola WWW X windows hypertext system for a Mime message
  36. # I expect caller (metamail) to supply the file to read with -f,
  37. # and it will be a /tmp file
  38.  
  39. # Process args 
  40. while ($#argv > 0 && "$1" =~ -*)
  41.   switch ($1)
  42.   case -f:
  43.     shift
  44.     if ($#argv < 1) goto usage
  45.     set TEMP = $1.html
  46.     cp $1 $TEMP
  47.     setenv WWW_HOME $TEMP
  48.     shift
  49.     breaksw
  50.   default:
  51.     goto usage
  52.     breaksw
  53.  endsw
  54. end
  55.  
  56. set VIOLA=/usr/local/WWW/Viola
  57. setenv VIOLA_PATH $VIOLA/apps
  58. $VIOLA/bin/viola 
  59. rm $TEMP
  60. exit 0
  61.  
  62. usage:
  63.  echo "usage: `basename $0` [-f HTML-FILE]"
  64.  exit 1
  65.  
  66. If you wish to use this script you will need to change the
  67. setting of VIOLA depending on where you installed it.
  68.  
  69. Best wishes, and now we can use Mime to send WWW to each
  70. other more easily.